import java.util.ArrayList;

import org.junit.Before;
import org.junit.Test;


public class SeqRequiredNumberTest {

	private int size;
	private WorkSchedule schedule;
	private Utils utils;
	@Before
	public void setUp(){
		size = 8;
		schedule = new WorkSchedule(size);
		utils = new Utils();
	}
	
	@Test
	public void testSeqRequiredNumber(){
		//Explanation: testing the first element
		//New TestCase: starttime==endtime
		//New TestCase: startime = 0
		//New TestCase: endtime < size-1
		//New TestCase: requirednumber Of employees > 0
		utils.UpdatePreviousScheduleList(schedule, size);
		schedule.setRequiredNumber(1, 0, 0);
		utils.testRequiredNumber(schedule, 1, 0, 0);
		
		//Explanation: change of the last element in the schedule
		//New TestCase: endtime = size -1
		//New TestCase: starttime > 0
		utils.UpdatePreviousScheduleList(schedule, size);
		schedule.setRequiredNumber(8, size -1, size -1);
		utils.testRequiredNumber(schedule, 8, size-1, size-1);
		
		//Explanation: changing the whole list
		//New TestCase: startime < endtime
		utils.UpdatePreviousScheduleList(schedule, size);
		schedule.setRequiredNumber(2, 0, size -1);
		utils.testRequiredNumber(schedule, 2, 0, size -1);
		
		//Explanation: testing adding an reqEmployees equals 0
		//New TestCase: Requirednumber Of employees = 0
		utils.UpdatePreviousScheduleList(schedule, size);
		schedule.setRequiredNumber(0, 0, 0);
		utils.testRequiredNumber(schedule, 0, 0, 0);
	}

}
